package com.nuanshui.heatedloan.baseservice.vo;

import com.nuanshui.framework.res.ResourceFacade;
import com.nuanshui.framework.springContext.SpringContextUtil;
import com.nuanshui.heatedloan.baseservice.model.Media;
import org.apache.commons.lang3.StringUtils;

public class MediaVO  extends Media{
	public String imgUrl;
	
	private String voiceUrl;
	
	private String videoUrl;
	
	private String videoImageUrl;
	

	public String getVideoUrl() {
		ResourceFacade resourceFacade = SpringContextUtil.getBean(ResourceFacade.class);
		if(resourceFacade != null && StringUtils.isNotEmpty(this.getVideoKey())){
			return resourceFacade.resolveUrl(this.getVideoKey(),false);
		}
		return null;
	}



	public void setVideoUrl(String videoUrl) {
		this.videoUrl = videoUrl;
	}


	public String getVideoImageUrl() {
		ResourceFacade resourceFacade = SpringContextUtil.getBean(ResourceFacade.class);
		if(resourceFacade != null && StringUtils.isNotEmpty(this.getVideoImageKey())){
			return resourceFacade.resolveUrl(this.getVideoImageKey(),false);
		}
		return null;
	}



	public void setVideoImageUrl(String videoImageUrl) {
		this.videoImageUrl = videoImageUrl;
	}



	public void setVoiceUrl(String voiceUrl) {
		this.voiceUrl = voiceUrl;
	}



	public String getVoiceUrl() {
		ResourceFacade resourceFacade = SpringContextUtil.getBean(ResourceFacade.class);
		if(resourceFacade != null && StringUtils.isNotEmpty(this.getVoiceKey())){
			return resourceFacade.resolveUrl(this.getVoiceKey(),false);
		}
		return null;
	}


	public String getImgUrl() {
		ResourceFacade resourceFacade = SpringContextUtil.getBean(ResourceFacade.class);
		if(resourceFacade != null && StringUtils.isNotEmpty(this.getImgKey())){
			return resourceFacade.resolveUrl(this.getImgKey(),false);
		}
		return null;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}


	
}
